﻿Public Class FileViewOptionsPage
    Inherits OptionPage
    Friend WithEvents ExplorerModern As System.Windows.Forms.RadioButton
    Friend WithEvents ExplorerContemporary As System.Windows.Forms.RadioButton
    Friend WithEvents ExplorerClassic As System.Windows.Forms.RadioButton
    Friend WithEvents ExplorerType As System.Windows.Forms.GroupBox

    Public Sub New()
        InitializeComponent()
    End Sub

    Public Overrides Sub OnApplySettings()
        If ExplorerClassic.Checked Then
            MainForm.FileView.FileViewType = FileView.FileViewMode.CLASSIC
        ElseIf ExplorerContemporary.Checked Then
            MainForm.FileView.FileViewType = FileView.FileViewMode.CONTEMPORARY
        ElseIf ExplorerModern.Checked Then
            MainForm.FileView.FileViewType = FileView.FileViewMode.MODERN
        End If

        Globals.UISettings.SetTrait("FileViewType", MainForm.FileView.FileViewType.ToString())
    End Sub

    Public Overrides Sub OnLoadSettings()

    End Sub

    Public Overrides Sub OnFocus()
        ExplorerClassic.Checked = False
        ExplorerContemporary.Checked = False
        ExplorerModern.Checked = False

        If MainForm.FileView.FileViewType = FileView.FileViewMode.CLASSIC Then
            ExplorerClassic.Checked = True
        ElseIf MainForm.FileView.FileViewType = FileView.FileViewMode.CONTEMPORARY Then
            ExplorerContemporary.Checked = True
        ElseIf MainForm.FileView.FileViewType = FileView.FileViewMode.MODERN Then
            ExplorerModern.Checked = True
        End If
    End Sub

    Private Sub InitializeComponent()
        Me.ExplorerType = New System.Windows.Forms.GroupBox()
        Me.ExplorerClassic = New System.Windows.Forms.RadioButton()
        Me.ExplorerContemporary = New System.Windows.Forms.RadioButton()
        Me.ExplorerModern = New System.Windows.Forms.RadioButton()
        Me.SuspendLayout()
        '
        'ExplorerType
        '
        Me.ExplorerType.Location = New System.Drawing.Point(10, 20)
        Me.ExplorerType.Name = "ExplorerType"
        Me.ExplorerType.Size = New System.Drawing.Size(220, 150)
        Me.ExplorerType.TabIndex = 0
        Me.ExplorerType.TabStop = False
        Me.ExplorerType.Text = "View Type"
        '
        'ExplorerClassic
        '
        Me.ExplorerClassic.AutoSize = True
        Me.ExplorerClassic.Location = New System.Drawing.Point(10, 35)
        Me.ExplorerClassic.Name = "ExplorerClassic"
        Me.ExplorerClassic.Size = New System.Drawing.Size(200, 24)
        Me.ExplorerClassic.TabIndex = 0
        Me.ExplorerClassic.TabStop = True
        Me.ExplorerClassic.Text = "Classic"
        Me.ExplorerClassic.UseVisualStyleBackColor = True
        '
        'ExplorerContemporary
        '
        Me.ExplorerContemporary.AutoSize = True
        Me.ExplorerContemporary.Location = New System.Drawing.Point(10, 70)
        Me.ExplorerContemporary.Name = "ExplorerContemporary"
        Me.ExplorerContemporary.Size = New System.Drawing.Size(200, 24)
        Me.ExplorerContemporary.TabIndex = 0
        Me.ExplorerContemporary.TabStop = True
        Me.ExplorerContemporary.Text = "Contemporary"
        Me.ExplorerContemporary.UseVisualStyleBackColor = True
        '
        'ExplorerModern
        '
        Me.ExplorerModern.AutoSize = True
        Me.ExplorerModern.Location = New System.Drawing.Point(10, 105)
        Me.ExplorerModern.Name = "ExplorerModern"
        Me.ExplorerModern.Size = New System.Drawing.Size(200, 24)
        Me.ExplorerModern.TabIndex = 0
        Me.ExplorerModern.TabStop = True
        Me.ExplorerModern.Text = "Modern"
        Me.ExplorerModern.UseVisualStyleBackColor = True

        ExplorerType.Controls.Add(ExplorerClassic)
        ExplorerType.Controls.Add(ExplorerContemporary)
        ExplorerType.Controls.Add(ExplorerModern)
        Controls.Add(ExplorerType)

        Text = "File Explorer"
        Me.ResumeLayout(False)

    End Sub
End Class
